<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../ext/resources/css/ext-all.css"
	type="text/css"></link>
<script type="text/javascript" src="../ext/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="../ext/ext-all.js"></script>
<script type="text/javascript">
	Ext.onReady(function() {
		Ext.QuickTips.init();
	});
	function applyExam(exam_state, exam_Id, startTime, endTime) {
		if (exam_state != 0) {
			Ext.Msg.show({
				title : '提示',
				msg : '对不起,该考试已经停止了报名,感谢您的关注！',
				buttons : Ext.MessageBox.OK,
				icon : Ext.MessageBox.INFO
			});
		} else {
			Ext.Ajax
					.request({
						url : '../examinee/validateUserExam.action',
						method : 'post',
						params : {
							exam_Id : exam_Id,
							startTime : startTime,
							endTime : endTime,
							status:1
						},
						success : function(response) {
							var obj = Ext.decode(response.responseText);
							if (obj.success == false) {
								Ext.Msg.show({
									title : '错误提示',
									msg : obj.msg,
									buttons : Ext.MessageBox.OK,
									icon : Ext.MessageBox.WARNING
								});
							} else {
								window.location.href = "../examinee/toApplyFormPage.action?exam_Id="
										+ exam_Id;
							}
						},
						failure : function(response) {
							Ext.Msg.alert("错误", "服务器连接失败！");
						}
					});
		}
	}
</script>
</head>
<body>
	<div class="right1" style="padding-left: 200px;">
		<p align="center">
			<font color="red" size="3px">关于考试详细信息表</font>
		</p>
		<div class="title5"></div>
		<div class="bar6" align="left"
			style="font-size: 12px; margin-left: 100px; width: 100%">
			<table>
				<tr>
					<td>考试名称:</td>
					<td>${examInfo.examInfo_Name}</td>
				</tr>
				<tr>
					<td>开始时间:</td>
					<td>${examInfo.examInfo_StartTime}</td>
				</tr>
				<tr>
					<td>结束时间:</td>
					<td>${examInfo.examInfo_EndTime}</td>
				</tr>
				<tr>
					<td>考试费用:</td>
					<td>${examInfo.examInfo_Money}</td>
				</tr>
				<tr>
					<td>考试状态:</td>
					<td><s:if test="examInfo.examInfo_State==0">报名可继续</s:if> <s:elseif
							test="examInfo.examInfo_State==3">可查询准考证号</s:elseif> <s:else>停止报名</s:else>
					</td>
				</tr>
				<tr>
					<td>LOGO:</td>
					<td><img
						src="../dateFile/examInfo/${examInfo.examInfo_Type.small_Id}/${examInfo.examInfo_Photo.photo_Name}"
						width="300px" height="60px" />
					</td>
				</tr>
				<tr>
					<td>考试介绍:</td>
					<td><textarea cols="50" rows="10" readonly="readonly"
							style="font-size: 12px" disabled="disabled">${examInfo.examInfo_Comments}</textarea>
					</td>
				</tr>
				<s:token></s:token>
				<tr>
					<td></td>
					<td><input type="button" value="    返     回    "
						onclick="history.back()" /> <input type="button"
						value="    报    考    "
						onclick="applyExam('${examInfo.examInfo_State}','${examInfo.examInfo_Id}','${examInfo.examInfo_StartTime}','${examInfo.examInfo_EndTime}')" />
					</td>
				</tr>
			</table>
		</div>
	</div>
</body>
</html>